# -*- mode: snippet -*-
# name: getopt template
# expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
# key: getopt
# --
try:
    opts, args = getopt.getopt(sys.argv[1:], "$1", ["$2"])
except getopt.GetoptError, e:
    print e
    sys.exit(2)
if opts:
    for o, a in opts:
        if o in ("-$1", "--$2"):
            $0
else:
    print """
Usage:
    %(cmd)s
    """ % {"cmd": sys.argv[0]}
    sys.exit(1)